﻿using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Peninsula.DataAccess.POCO;

namespace Peninsula.DataAccess.EF
{
    public class TestEFContext:DbContext
    {
        public TestEFContext(string nameOrConnectionString)
            : base(nameOrConnectionString)
        {

        }

        #region 实体
        public virtual DbSet<Admin> Admins { get; set; } // 管理员
        public virtual DbSet<Role> Roles { get; set; } // 角色
        public virtual DbSet<Permission> Permissions { get; set; } // 权限
        public virtual DbSet<Configuration> Configurations { get; set; } // 配置

        public virtual DbSet<Store> Stores { get; set; }//维修店面
        public virtual DbSet<DataAccess.POCO.ItemType> Types { get; set; }//维修物品类型
        public virtual DbSet<DataAccess.POCO.StoreManger> StoreMangers { get; set; }//店面管理员
        public virtual DbSet<DataAccess.POCO.MaintenanceStaff> MaintenanceStaffs { get; set; }//维修人员
        public virtual DbSet<DataAccess.POCO.Households> Householdses { get; set; }//户主
        public virtual DbSet<DataAccess.POCO.RepairOrder> RepairOrders { get; set; }//订单
        public virtual DbSet<DataAccess.POCO.SiteFile> SiteFiles { get; set; }//文件 
        public virtual DbSet<DataAccess.POCO.HouseholdsRestatistics> HouseholdsRestatisticses { get; set; }//户主统计
        public virtual DbSet<DataAccess.POCO.StoreRestatistics> StoreRestatisticses { get; set; }//店面统计
        public virtual DbSet<DataAccess.POCO.MaintenanceStaffRestatistics> MaintenanceStaffRestatisticses { get; set; }//维修人员统计
        #endregion

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {

        }
    }
}
